﻿#ifndef LINE_H_INCLUDED
#define LINE_H_INCLUDED

#include "MathVector2d.h"

class Line
{
    public:
        Line( const MathVector2d<float>& m, const float& a, const float& b )
            :v( m )
            ,x( a )
            ,y( b )
        {}

        float get_x() const{ return x; }
        float get_y() const{ return y; }

        void set_x( int a ){ x = a; }
        void set_y( int a ){ y = a; }

        MathVector2d<float> get_vector() const{ return v; }
        MathVector2d<float> set_vector( MathVector2d<float> m ){ v = m; }
    protected:
    private:
        MathVector2d<float> v;
        float x , y;
};

  //if lines are parallel returns true ,else returns false
bool are_Parallel( const Line& a, const Line& b );

  //checks if dot belongs to line
bool checkDotInLine( const Line& a, const float b, const float c );

  //returns radius-vector to point at which lines cross at
MathVector2d<float> getLineIntersection( const Line& a, const Line& b );

#endif // LINE_H
